import React, {PropTypes} from "react";
import {
	View,
	Image,
	Text,
	StyleSheet,
} from "react-native";

const propTypes = {
	source: Image.propTypes.source,
	text: PropTypes.string,
	DateText: PropTypes.element,
	ContentText: PropTypes.string,
}

const CustomCard = (({
	source,
	text,
	DateText,
	ContentText,
}) => (
	<View style={styles.container}>
		<View style={styles.imgContainer}>
			<Image style={styles.imgWidth} source={source} />
			<View>
				<Text>{text}</Text>
				<Text style={styles.dateText}>{DateText}</Text>
			</View>
		</View>
		<Text style={styles.contentText}>
			{ContentText}
		</Text>
	</View>
))

CustomCard.propTypes = propTypes;
CustomCard.defaultPropTypes = {
	source: null,
}

const styles = StyleSheet.create({
	container: {
		backgroundColor: gColor.fontColorFive,
		padding: 13,
		marginBottom: 5,
	},
	imgContainer: {
		flexDirection: "row",
		alignItems: "center",
		marginBottom: 5,
	},
	imgWidth: {
		width: 32,
		height: 32,
		borderRadius: 14,
		marginRight: 5,
	},
	dateText: {
		fontSize: gFontSize.three,
	},
	
})

export default CustomCard;